﻿@model PhoneBilling.Models.GradeDetailEditModel
@{
    ViewBag.Title = "计费等级表编辑";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    $(document).ready(
function () {
    changeCheck1();
    changeCheck2();
});
    function changeCheck1() {
        $(".c1").attr("disabled", $(".check1").attr("checked") != "checked");
    }
    function changeCheck2() {
        $(".c2").attr("disabled", $(".check2").attr("checked") != "checked");
    }
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#btnConfirm").ligerButton(
        {
            click: function () {
                $('form').submit();
            }
        });
    });
    
</script>
@using (Html.BeginForm())
{
    <div class="grade_detail_edit">
        @Html.HiddenFor(m => m.GradeID)
        @Html.HiddenFor(m => m.IsNew)
        <div class="system_contain_group">
            <h3 class="title">
                收费设置</h3>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.话类)
                @if (Model.IsNew)
                {
                    @Html.DropDownListFor(m => m.话类, new SelectList(Model.AreaTypeList, "ID", "Name"), new { style = "input-text" })
                    @Html.ValidationMessageFor(m => m.话类, new { style = "color:Red" })
                }
                else
                {
                    @Html.DisplayFor(m => m.话类)
                    @Html.HiddenFor(m => m.话类)
                }
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.最小计费延时)
                @Html.TextBoxFor(m => m.最小计费延时)
                @Html.ValidationMessageFor(m => m.最小计费延时, new { style = "color:Red" })
                @Html.LabelFor(m => m.时长误差)
                @Html.TextBoxFor(m => m.时长误差)
                @Html.ValidationMessageFor(m => m.时长误差, new { style = "color:Red" })
                @Html.LabelFor(m => m.最小计次次数)
                @Html.TextBoxFor(m => m.最小计次次数)
                @Html.ValidationMessageFor(m => m.最小计次次数, new { style = "color:Red" })
            </div>
        </div>
        <div class="system_contain_group">
            <h3 class="title">
                费用设置</h3>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.服务费缩放系数)
                @Html.TextBoxFor(m => m.服务费缩放系数)
                @Html.ValidationMessageFor(m => m.服务费缩放系数, new { style = "color:Red" })
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.服务费按基本费的比例收取时的系数)
                @Html.TextBoxFor(m => m.服务费按基本费的比例收取时的系数)
                @Html.ValidationMessageFor(m => m.服务费按基本费的比例收取时的系数, new { style = "color:Red" })
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.附加费按基本费的比例收取时的系数)
                @Html.TextBoxFor(m => m.附加费按基本费的比例收取时的系数)
                @Html.ValidationMessageFor(m => m.附加费按基本费的比例收取时的系数, new { style = "color:Red" })
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.附加费按服务器的比例收取时的系数)
                @Html.TextBoxFor(m => m.附加费按服务器的比例收取时的系数)
                @Html.ValidationMessageFor(m => m.附加费按服务器的比例收取时的系数, new { style = "color:Red" })
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.单笔花费最小金额)
                @Html.TextBoxFor(m => m.单笔花费最小金额)
                @Html.ValidationMessageFor(m => m.单笔花费最小金额, new { style = "color:Red" })
                @Html.LabelFor(m => m.单笔花费最大金额)
                @Html.TextBoxFor(m => m.单笔花费最大金额)
                @Html.ValidationMessageFor(m => m.单笔花费最大金额, new { style = "color:Red" })
            </div>
            <div class="system_input_contain">
                @Html.LabelFor(m => m.包月话类收费起点)
                @Html.TextBoxFor(m => m.包月话类收费起点)
                @Html.ValidationMessageFor(m => m.包月话类收费起点, new { style = "color:Red" })
                @Html.LabelFor(m => m.包月话类封顶限额)
                @Html.TextBoxFor(m => m.包月话类封顶限额)
                @Html.ValidationMessageFor(m => m.包月话类封顶限额, new { style = "color:Red" })
            </div>
        </div>
        <div class="system_contain_group">
            <h3 class="title">
                话费取整</h3>
            <div class="system_input_contain">
                <div class="system_checkbox">
                    @Html.CheckBoxFor(m => m.优惠折扣单价取整, new { onclick = "changeCheck1()", @class = "check1" })
                    @Html.LabelFor(m => m.优惠折扣单价取整)
                    @Html.RadioButtonFor(m => m.尾数优惠, "元", new { @class = "c1" })
                    <label>
                        元
                    </label>
                    @Html.RadioButtonFor(m => m.尾数优惠, "角", new { @class = "c1" })
                    <label>
                        角
                    </label>
                    @Html.RadioButtonFor(m => m.尾数优惠, "分", new { @class = "c1" })
                    <label>
                        分
                    </label>
                    <label>
                        尾数处理：</label>
                    @Html.RadioButtonFor(m => m.取整优惠, "四舍五入", new { @class = "c1" })
                    <label>
                        四舍五入
                    </label>
                    @Html.RadioButtonFor(m => m.取整优惠, "逢尾数进位", new { @class = "c1" })
                    <label>
                        逢尾数进位
                    </label>
                    @Html.RadioButtonFor(m => m.取整优惠, "逢尾数舍去", new { @class = "c1" })
                    <label>
                        逢尾数舍去
                    </label>
                </div>
            </div>
            <div class="system_input_contain">
                <div class="system_checkbox">
                    @Html.CheckBoxFor(m => m.单笔花费总价取整, new { onclick = "changeCheck2()", @class = "check2" })
                    @Html.LabelFor(m => m.单笔花费总价取整)
                    @Html.RadioButtonFor(m => m.尾数单笔, "元", new { @class = "c2" })
                    <label>
                        元
                    </label>
                    @Html.RadioButtonFor(m => m.尾数单笔, "角", new { @class = "c2" })
                    <label>
                        角
                    </label>
                    @Html.RadioButtonFor(m => m.尾数单笔, "分", new { @class = "c2" })
                    <label>
                        分
                    </label>
                    <label>
                        尾数处理：</label>
                    @Html.RadioButtonFor(m => m.取整单笔, "四舍五入", new { @class = "c2" })
                    <label>
                        四舍五入
                    </label>
                    @Html.RadioButtonFor(m => m.取整单笔, "逢尾数进位", new { @class = "c2" })
                    <label>
                        逢尾数进位
                    </label>
                    @Html.RadioButtonFor(m => m.取整单笔, "逢尾数舍去", new { @class = "c2" })
                    <label>
                        逢尾数舍去
                    </label>
                </div>
            </div>
        </div>
        <div class="system_input_contain">
            <input type="button" id="btnConfirm" value="确定" />
        </div>
    </div>
}
